home *** CD-ROM | disk | FTP | other *** search
- ###########################################
- # LOGIN.CMD - Call Internet On-Ramp, Inc. #
- ###########################################
-
- #trace on
- #
- # set up some strings for dialling up
- #
- load $number
- load $username
-
- if ![load $password]
- if [password "Enter your login password, or 'prompt'."]
- save $password
- end
- end
- if [$password = "prompt"]
- $password = ""
- password "Enter your login password."
- end
-
- $modeminit = "&f"
- $modemsetup = "&c1"
- $userprompt = "ogin:"
- $passprompt = "word:"
- $addrtarg = "to"
-
- # If you wish tho change the number of redial attempts,
- # alter the 'attempts' variable below.
- #
- %attempts = 10
- #
- #----------------------------------------------------------
- #
- # initialize modem
- #
- output "at"$modeminit\13
- if ! [input 10 OK\n]
- display "Modem is not responding"\n
- abort
- end
- #
- # setup our modem commands
- #
- output "at"$modemsetup\13
- input 10 OK\n
- #
- #
- display \n
- display Attempting to Call Internet On-Ramp.\n
- display Should a busy signals be encountered, %attempts\n
- display attempts will be made at 60 second intervals.\n
- display To abort the redial process, press the ESC key.\n
- display \n
- #
- # send phone number
- #
- %n = 1
- repeat
- display Connect attempt Number %n\n
- if %n > %attempts
- display Too many dial attempts\n
- abort
- end
- output "atdt"$number\13
- %ok = [input 60 CONNECT]
- %n = %n + 1
- until %ok
- input 10 \n
- #
- # wait till it's safe to send because some modem's hang up
- # if you transmit during the connection phase
- #
- wait 30 dcd
- sleep 1
- #
- #
- # wait for the username prompt
- #
- input 30 $userprompt
- output $username\13
- #
- # and the password
- #
- input 30 $passprompt
- output $password\13
- #
- if ! [input 20 $addrtarg]
- #
- # prevent prying eyes from seeing the $password variable
- #
- $password = ""
- #
- display \n\n\n
- display \7Something is Wrong. We couldn\'t get logged in. You may \n
- display \7have entered an incorrect password or the server might be\n
- display \7down or very busy right now. First, try running \'SETUP.CMD\'\n
- display \7from the Winsock \'Dialer\' menu to change the password. If \n
- display \7this is ineffective, call IOR support for assistance.\n
- display \n
- #
- sleep 3
- output +++
- input 5 OK\n
- output ath0\r
- input 5 OK\n
- #
- abort
- #
- else
- #
- # prevent prying eyes from seeing the $password variable
- #
- $password = ""
- #
- # parse address
- #
- address 30
- #
- # we are now connected, logged in and in PPP mode.
- #
- display \n
- display Your IP address is \i.\n
- display \n
- #
- sleep 5
- display You may now minimize this window and start another Network Application.\n
- display \n
- display To start this window minimized in the future, do the following:\n
- display \tMinimize this Window.\n
- display \tClick on the Winsock Icon.\n
- display \tClick on \'Close\'.\n
- display \n\7
- #
- end
-